package timing.ukulele.project.client;

import timing.ukulele.project.client.callback.ItemClientCallback;
import timing.ukulele.common.ResponseResult;
import timing.ukulele.common.item.ItemData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "ukulele-item", path = "item", fallback = ItemClientCallback.class)
public interface ItemClient {
    @GetMapping("/api/item/getByCode")
    ResponseResult<ItemData> getByCode(@RequestParam("code") String code);
}
